/*
 * @Description: 测试类
 * @Author: rendc
 * @Date: 2025-08-05 14:51:07
 * @LastEditors: rendc
 * @LastEditTime: 2025-08-05 15:02:12
 */
public class Test {

  public static void main(String[] args) {
    Monkey monkey = new Monkey("棕色", 2, "大师兄");
    monkey.eat();
    monkey.sleep();
    monkey.jump();
    monkey.cycle();
    monkey.toString();
    System.out.println("--==--==--==--");
    // 多态
    Animal2 a2 = new Monkey("棕色", 2, "猴哥");
    // 方法：编译看左边，运行看右边
    a2.eat();
    a2.sleep();
    a2.toString();
    // 向下转型
    Monkey m2 = (Monkey) a2;
    m2.jump();
    m2.cycle();
    System.out.println("--==--==--==--");
    ICycleAble c = new Monkey("棕色", 999, "悟空");
    // c.eat();
    // c.sleep();
    // c.jump();
    c.cycle();
    c.toString();
  }
}